// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_tcpipports
// * CreateDate    : 2014-06-05 18:30:02
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:02
// * LastChanger   : 2014-06-05 18:30:02
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmTcpipportsEntity : EntityBase
    {
        public HmTcpipportsTable TableSchema
        {
            get
            {
                return HmTcpipportsTable.Current;
            }
		}
		
		public HmTcpipportsEntity()
        {

        }
		
		public HmTcpipportsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Portid = Convert.ToInt32(CommonFunctions.ToObject(dr["portid"]));
			this.Portprotocol = Convert.ToByte(CommonFunctions.ToObject(dr["portprotocol"]));
			this.Portnumber = Convert.ToInt32(CommonFunctions.ToObject(dr["portnumber"]));
			this.Portaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["portaddress1"]));
			this.Portaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["portaddress2"]));
			this.Portusessl = Convert.ToByte(CommonFunctions.ToObject(dr["portusessl"]));
			this.Portsslcertificateid = Convert.ToInt64(CommonFunctions.ToObject(dr["portsslcertificateid"]));
        }
		
		public HmTcpipportsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Portid = Convert.ToInt32(CommonFunctions.ToObject(dr["portid"]));
			this.Portprotocol = Convert.ToByte(CommonFunctions.ToObject(dr["portprotocol"]));
			this.Portnumber = Convert.ToInt32(CommonFunctions.ToObject(dr["portnumber"]));
			this.Portaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["portaddress1"]));
			this.Portaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["portaddress2"]));
			this.Portusessl = Convert.ToByte(CommonFunctions.ToObject(dr["portusessl"]));
			this.Portsslcertificateid = Convert.ToInt64(CommonFunctions.ToObject(dr["portsslcertificateid"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmTcpipportsTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Portid
        {
            get { return Convert.ToInt32(GetData(HmTcpipportsTable.C_portid)); }
            set { SetData(HmTcpipportsTable.C_portid, value); }
        }
		
        [DataMember]
        public byte Portprotocol
        {
            get { return Convert.ToByte(GetData(HmTcpipportsTable.C_portprotocol)); }
            set { SetData(HmTcpipportsTable.C_portprotocol, value); }
        }
		
        [DataMember]
        public int Portnumber
        {
            get { return Convert.ToInt32(GetData(HmTcpipportsTable.C_portnumber)); }
            set { SetData(HmTcpipportsTable.C_portnumber, value); }
        }
		
        [DataMember]
        public long Portaddress1
        {
            get { return Convert.ToInt64(GetData(HmTcpipportsTable.C_portaddress1)); }
            set { SetData(HmTcpipportsTable.C_portaddress1, value); }
        }
		
        [DataMember]
        public long Portaddress2
        {
            get { return Convert.ToInt64(GetData(HmTcpipportsTable.C_portaddress2)); }
            set { SetData(HmTcpipportsTable.C_portaddress2, value); }
        }
		
        [DataMember]
        public byte Portusessl
        {
            get { return Convert.ToByte(GetData(HmTcpipportsTable.C_portusessl)); }
            set { SetData(HmTcpipportsTable.C_portusessl, value); }
        }
		
        [DataMember]
        public long Portsslcertificateid
        {
            get { return Convert.ToInt64(GetData(HmTcpipportsTable.C_portsslcertificateid)); }
            set { SetData(HmTcpipportsTable.C_portsslcertificateid, value); }
        }
		
		#endregion
	}
	
	
}	

